package mx.edu.itsur.sism.webapp.action;

import java.io.Serializable;
import java.util.List;

import mx.edu.itsur.sism.webapp.action.BasePage;
import mx.edu.itsur.sism.model.Maquina;
import mx.edu.itsur.sism.service.GenericManager;

public class MaquinaList extends BasePage implements Serializable {
    private GenericManager<Maquina, Long> maquinaManager;

    public void setMaquinaManager(GenericManager<Maquina, Long> maquinaManager) {
        this.maquinaManager = maquinaManager;
    }

    public MaquinaList() {
        setSortColumn("id"); // sets the default sort column
    }

    public List getMaquinas() {
        return sort(maquinaManager.getAll());
    }
}

